<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.16"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibTools: CTcpIoClient类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibTools
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.16 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="#pub-attribs">Public 属性</a> &#124;
<a href="#pri-methods">Private 成员函数</a> &#124;
<a href="class_c_tcp_io_client-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">CTcpIoClient类 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>tcp io 客户端服务类  
 <a href="class_c_tcp_io_client.html#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:ae429cb6f2a0a0e7cea6ff0652acd92a0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#ae429cb6f2a0a0e7cea6ff0652acd92a0">CTcpIoClient</a> (bool isWriteLog=false)</td></tr>
<tr class="memdesc:ae429cb6f2a0a0e7cea6ff0652acd92a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">构造一个tcp io客户端类  <a href="class_c_tcp_io_client.html#ae429cb6f2a0a0e7cea6ff0652acd92a0">更多...</a><br /></td></tr>
<tr class="separator:ae429cb6f2a0a0e7cea6ff0652acd92a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a965f48bb734bddf47d931d09cc502d92"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a965f48bb734bddf47d931d09cc502d92">~CTcpIoClient</a> ()</td></tr>
<tr class="memdesc:a965f48bb734bddf47d931d09cc502d92"><td class="mdescLeft">&#160;</td><td class="mdescRight">销毁一个tcp io客户端类  <a href="class_c_tcp_io_client.html#a965f48bb734bddf47d931d09cc502d92">更多...</a><br /></td></tr>
<tr class="separator:a965f48bb734bddf47d931d09cc502d92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab6fce95f05e531d5c3a5d6a020b009ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_sock_error.html">CSockError</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#ab6fce95f05e531d5c3a5d6a020b009ed">Init</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, bool isServer=false)</td></tr>
<tr class="memdesc:ab6fce95f05e531d5c3a5d6a020b009ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化套接字与服务类设备进行绑定  <a href="class_c_tcp_io_client.html#ab6fce95f05e531d5c3a5d6a020b009ed">更多...</a><br /></td></tr>
<tr class="separator:ab6fce95f05e531d5c3a5d6a020b009ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adab0eb30871fb90cd4806061cd3f9c8f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#adab0eb30871fb90cd4806061cd3f9c8f">Run</a> ()</td></tr>
<tr class="memdesc:adab0eb30871fb90cd4806061cd3f9c8f"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行服务  <a href="class_c_tcp_io_client.html#adab0eb30871fb90cd4806061cd3f9c8f">更多...</a><br /></td></tr>
<tr class="separator:adab0eb30871fb90cd4806061cd3f9c8f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28b76b0e0415f53f43a581ad848576d4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a28b76b0e0415f53f43a581ad848576d4">Run_One</a> ()</td></tr>
<tr class="memdesc:a28b76b0e0415f53f43a581ad848576d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">运行服务一次  <a href="class_c_tcp_io_client.html#a28b76b0e0415f53f43a581ad848576d4">更多...</a><br /></td></tr>
<tr class="separator:a28b76b0e0415f53f43a581ad848576d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad1b0557e09e101c003ae36c7aea8d30"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#aad1b0557e09e101c003ae36c7aea8d30">NotifyStop</a> ()</td></tr>
<tr class="memdesc:aad1b0557e09e101c003ae36c7aea8d30"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知服务停止  <a href="class_c_tcp_io_client.html#aad1b0557e09e101c003ae36c7aea8d30">更多...</a><br /></td></tr>
<tr class="separator:aad1b0557e09e101c003ae36c7aea8d30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9610637fd6e604b36c222c32334f5a3a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a9610637fd6e604b36c222c32334f5a3a">IsStop</a> () const</td></tr>
<tr class="memdesc:a9610637fd6e604b36c222c32334f5a3a"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断服务是否已经停止  <a href="class_c_tcp_io_client.html#a9610637fd6e604b36c222c32334f5a3a">更多...</a><br /></td></tr>
<tr class="separator:a9610637fd6e604b36c222c32334f5a3a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a786b6dd01ea269a79849fb6cc6beedd7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a786b6dd01ea269a79849fb6cc6beedd7">WaitServerStop</a> ()</td></tr>
<tr class="memdesc:a786b6dd01ea269a79849fb6cc6beedd7"><td class="mdescLeft">&#160;</td><td class="mdescRight">通知服务停止并等待  <a href="class_c_tcp_io_client.html#a786b6dd01ea269a79849fb6cc6beedd7">更多...</a><br /></td></tr>
<tr class="separator:a786b6dd01ea269a79849fb6cc6beedd7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e7895d97e4c364c67b6cdd0790f29ea"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_c_basic_service.html">CBasicService</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a5e7895d97e4c364c67b6cdd0790f29ea">GetTcpServicePtr</a> ()</td></tr>
<tr class="memdesc:a5e7895d97e4c364c67b6cdd0790f29ea"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取底层服务类  <a href="class_c_tcp_io_client.html#a5e7895d97e4c364c67b6cdd0790f29ea">更多...</a><br /></td></tr>
<tr class="separator:a5e7895d97e4c364c67b6cdd0790f29ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个接收连接请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>待连接的套接字类 </td></tr>
    <tr><td class="paramname">func</td><td>完成回调函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section remark"><dt>备注</dt><dd>不管投递的成功与否，都会经过回调函数返回给上层调用 </dd></dl>
</div></td></tr>
<tr class="memitem:a5108d1e20ddf728920483c7c7b071e3f"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a5108d1e20ddf728920483c7c7b071e3f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a5108d1e20ddf728920483c7c7b071e3f">AsyncConnect</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, Func func)</td></tr>
<tr class="separator:a5108d1e20ddf728920483c7c7b071e3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af68b6c887a2e48874d8172a7c206fe59"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:af68b6c887a2e48874d8172a7c206fe59"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#af68b6c887a2e48874d8172a7c206fe59">AsyncConnect</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, Func func, void *invoker)</td></tr>
<tr class="separator:af68b6c887a2e48874d8172a7c206fe59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个接收请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>已连接的套接字类 </td></tr>
    <tr><td class="paramname">buff</td><td>接收缓冲 </td></tr>
    <tr><td class="paramname">func</td><td>完成函数指针 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:a6802e9a74061274065a7a7f23687e30f"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a6802e9a74061274065a7a7f23687e30f"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a6802e9a74061274065a7a7f23687e30f">AsyncRead</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, Func func)</td></tr>
<tr class="separator:a6802e9a74061274065a7a7f23687e30f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe3199caa2e50c70e8625abbb8ab38e4"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:afe3199caa2e50c70e8625abbb8ab38e4"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#afe3199caa2e50c70e8625abbb8ab38e4">AsyncRead</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, Func func, void *invoker)</td></tr>
<tr class="separator:afe3199caa2e50c70e8625abbb8ab38e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个写请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>已连接的套接字类 </td></tr>
    <tr><td class="paramname">buff</td><td>发送缓冲 </td></tr>
    <tr><td class="paramname">func</td><td>完成函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:ad1da681716d36e58e41e61a56c64604e"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:ad1da681716d36e58e41e61a56c64604e"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#ad1da681716d36e58e41e61a56c64604e">AsyncSend</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, Func func)</td></tr>
<tr class="separator:ad1da681716d36e58e41e61a56c64604e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ff7fd9ca180c5df28f6a9e527fbdcdc"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a8ff7fd9ca180c5df28f6a9e527fbdcdc"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a8ff7fd9ca180c5df28f6a9e527fbdcdc">AsyncSend</a> (<a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;sock, const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;buff, Func func, void *invoker)</td></tr>
<tr class="separator:a8ff7fd9ca180c5df28f6a9e527fbdcdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">投递一个中断请求</div></td></tr>
<tr><td colspan="2"><div class="groupText"><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">func</td><td>完成回调函数 </td></tr>
    <tr><td class="paramname">invoker</td><td>用户传递的数据 </td></tr>
  </table>
  </dd>
</dl>
</div></td></tr>
<tr class="memitem:a14c502b0d90ceb4d20828f8b878ee4ce"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:a14c502b0d90ceb4d20828f8b878ee4ce"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a14c502b0d90ceb4d20828f8b878ee4ce">Post</a> (Func func)</td></tr>
<tr class="separator:a14c502b0d90ceb4d20828f8b878ee4ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea623f509a016e7313f646bbbf4b90d7"><td class="memTemplParams" colspan="2">template&lt;class Func &gt; </td></tr>
<tr class="memitem:aea623f509a016e7313f646bbbf4b90d7"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#aea623f509a016e7313f646bbbf4b90d7">Post</a> (Func func, void *invoker)</td></tr>
<tr class="separator:aea623f509a016e7313f646bbbf4b90d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public 属性</h2></td></tr>
<tr class="memitem:a9ff74ee2f85db45be210500111f07746"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt; <a class="el" href="class_c_tcp_client.html">CTcpClient</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a9ff74ee2f85db45be210500111f07746">_service</a></td></tr>
<tr class="separator:a9ff74ee2f85db45be210500111f07746"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private 成员函数</h2></td></tr>
<tr class="memitem:a2e8d159bd627ceeda4d87f284ba23e6a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_tcp_io_client.html#a2e8d159bd627ceeda4d87f284ba23e6a">delete_class_copy_operator</a> (<a class="el" href="class_c_tcp_io_client.html">CTcpIoClient</a>)</td></tr>
<tr class="separator:a2e8d159bd627ceeda4d87f284ba23e6a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>tcp io 客户端服务类 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00011">11</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="ae429cb6f2a0a0e7cea6ff0652acd92a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae429cb6f2a0a0e7cea6ff0652acd92a0">&#9670;&nbsp;</a></span>CTcpIoClient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTcpIoClient::CTcpIoClient </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isWriteLog</em> = <code>false</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>构造一个tcp io客户端类 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">isWriteLog</td><td>是否打印内部调试日志 </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00019">19</a> 行定义.</p>

</div>
</div>
<a id="a965f48bb734bddf47d931d09cc502d92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a965f48bb734bddf47d931d09cc502d92">&#9670;&nbsp;</a></span>~CTcpIoClient()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTcpIoClient::~CTcpIoClient </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>销毁一个tcp io客户端类 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00024">24</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a5108d1e20ddf728920483c7c7b071e3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5108d1e20ddf728920483c7c7b071e3f">&#9670;&nbsp;</a></span>AsyncConnect() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::AsyncConnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00045">45</a> 行定义.</p>

</div>
</div>
<a id="af68b6c887a2e48874d8172a7c206fe59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af68b6c887a2e48874d8172a7c206fe59">&#9670;&nbsp;</a></span>AsyncConnect() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::AsyncConnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00049">49</a> 行定义.</p>

</div>
</div>
<a id="a6802e9a74061274065a7a7f23687e30f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6802e9a74061274065a7a7f23687e30f">&#9670;&nbsp;</a></span>AsyncRead() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::AsyncRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00063">63</a> 行定义.</p>

</div>
</div>
<a id="afe3199caa2e50c70e8625abbb8ab38e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe3199caa2e50c70e8625abbb8ab38e4">&#9670;&nbsp;</a></span>AsyncRead() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::AsyncRead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00067">67</a> 行定义.</p>

</div>
</div>
<a id="ad1da681716d36e58e41e61a56c64604e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1da681716d36e58e41e61a56c64604e">&#9670;&nbsp;</a></span>AsyncSend() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::AsyncSend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00081">81</a> 行定义.</p>

</div>
</div>
<a id="a8ff7fd9ca180c5df28f6a9e527fbdcdc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ff7fd9ca180c5df28f6a9e527fbdcdc">&#9670;&nbsp;</a></span>AsyncSend() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::AsyncSend </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_c_stream_iteator.html">CStreamIteator</a> &amp;&#160;</td>
          <td class="paramname"><em>buff</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00085">85</a> 行定义.</p>

</div>
</div>
<a id="a2e8d159bd627ceeda4d87f284ba23e6a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e8d159bd627ceeda4d87f284ba23e6a">&#9670;&nbsp;</a></span>delete_class_copy_operator()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">CTcpIoClient::delete_class_copy_operator </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_client.html">CTcpIoClient</a>&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">private</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="a5e7895d97e4c364c67b6cdd0790f29ea"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e7895d97e4c364c67b6cdd0790f29ea">&#9670;&nbsp;</a></span>GetTcpServicePtr()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_basic_service.html">CBasicService</a>* CTcpIoClient::GetTcpServicePtr </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>获取底层服务类 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00133">133</a> 行定义.</p>

</div>
</div>
<a id="ab6fce95f05e531d5c3a5d6a020b009ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab6fce95f05e531d5c3a5d6a020b009ed">&#9670;&nbsp;</a></span>Init()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_sock_error.html">CSockError</a> CTcpIoClient::Init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_c_tcp_io_socket.html">CTcpIoSocket</a> &amp;&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isServer</em> = <code>false</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>初始化套接字与服务类设备进行绑定 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>待绑定的套接字类 </td></tr>
    <tr><td class="paramname">isServer</td><td>初始化类型，必须使用默认值 </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>返回</dt><dd>成功返回SUCC，失败返回相应的错误码 </dd></dl>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00032">32</a> 行定义.</p>

</div>
</div>
<a id="a9610637fd6e604b36c222c32334f5a3a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9610637fd6e604b36c222c32334f5a3a">&#9670;&nbsp;</a></span>IsStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTcpIoClient::IsStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断服务是否已经停止 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00123">123</a> 行定义.</p>

</div>
</div>
<a id="aad1b0557e09e101c003ae36c7aea8d30"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad1b0557e09e101c003ae36c7aea8d30">&#9670;&nbsp;</a></span>NotifyStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::NotifyStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知服务停止 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00118">118</a> 行定义.</p>

</div>
</div>
<a id="a14c502b0d90ceb4d20828f8b878ee4ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a14c502b0d90ceb4d20828f8b878ee4ce">&#9670;&nbsp;</a></span>Post() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::Post </td>
          <td>(</td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00098">98</a> 行定义.</p>

</div>
</div>
<a id="aea623f509a016e7313f646bbbf4b90d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea623f509a016e7313f646bbbf4b90d7">&#9670;&nbsp;</a></span>Post() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class Func &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::Post </td>
          <td>(</td>
          <td class="paramtype">Func&#160;</td>
          <td class="paramname"><em>func</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>invoker</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00102">102</a> 行定义.</p>

</div>
</div>
<a id="adab0eb30871fb90cd4806061cd3f9c8f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adab0eb30871fb90cd4806061cd3f9c8f">&#9670;&nbsp;</a></span>Run()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTcpIoClient::Run </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行服务 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00108">108</a> 行定义.</p>

</div>
</div>
<a id="a28b76b0e0415f53f43a581ad848576d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a28b76b0e0415f53f43a581ad848576d4">&#9670;&nbsp;</a></span>Run_One()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTcpIoClient::Run_One </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>运行服务一次 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00113">113</a> 行定义.</p>

</div>
</div>
<a id="a786b6dd01ea269a79849fb6cc6beedd7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a786b6dd01ea269a79849fb6cc6beedd7">&#9670;&nbsp;</a></span>WaitServerStop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTcpIoClient::WaitServerStop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>通知服务停止并等待 </p>

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00128">128</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">类成员变量说明</h2>
<a id="a9ff74ee2f85db45be210500111f07746"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9ff74ee2f85db45be210500111f07746">&#9670;&nbsp;</a></span>_service</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_shared_ptr.html">SharedPtr</a>&lt;<a class="el" href="class_c_tcp_client.html">CTcpClient</a>&gt; CTcpIoClient::_service</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a> 第 <a class="el" href="_tcp_io_client_8h_source.html#l00138">138</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>H:/project/LibTools/src/socket/<a class="el" href="_tcp_io_client_8h_source.html">TcpIoClient.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.16
</small></address>
</body>
</html>
